/*
 * @Date: 2022-02-23 11:30:11
 * @LastEditors: 春贰
 * @gitee: https://gitee.com/chun22222222
 * @github: https://github.com/chun222
 * @Desc:
 * @LastEditTime: 2022-03-25 17:47:13
 * @FilePath: \server\system\model\RequestModel\sys_user.go
 */
package RequestModel

import "go2admin_pure/system/model/CommonModel"

type Login struct {
	Loginname string `json:"loginname" binding:"required"` // 用户名
	Password  string `json:"password" binding:"required"`  // 密码
	Kick      uint   `json:"kick"  binding:"required"`     //99：强制登录,1：已经登录需要询问，0：直接可以登录
}

type SysUserSet struct {
	LoginName string `json:"login_name" binding:"required"`
	UserName  string `json:"user_name" binding:"required"`
	Password  string `json:"password" binding:"required"`
	Status    int    `json:"status"`
	Email     string `json:"email" binding:"omitempty,email"`
	Phone     string `json:"phone"`
}

type SysUserSearch struct {
	CommonModel.PageInfo
	LoginName string `json:"login_name" search:"like"`
	UserName  string `json:"user_name" search:"like"`
	Status    int    `json:"status" search:"="`
	Email     string `json:"email" search:"like"`
	Phone     string `json:"phone" search:"like"`
	CreatedAt string `json:"create_time" search:"btw"`
}

type SysPermissionSearch struct {
	Name   string `json:"name" search:"like"`
	Title  string `json:"title" search:"like"`
	Path   string `json:"path" search:"like"`
	Sort   uint   `json:"sort" search:"<"`
	Type   string `json:"type" search:"="`
	Status uint   `json:"status" search:"="`
	Hidden uint   `json:"hidden" search:"="`
}

type SysRoleSearch struct {
	Name  string `json:"name" search:"like"`
	Title string `json:"title" search:"like"`
}

type SysSetPermissions struct {
	Id              uint   `json:"id" binding:"required"`
	CheckedKeys     []uint `json:"checkedkeys" binding:"required"`
	HalfCheckedKeys []uint `json:"halfcheckedkeys" binding:"required"`
}

type SysSetRoles struct {
	Id    uint   `json:"id" binding:"required"`
	Roles []uint `json:"roles" binding:"required"`
}
